<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>prc: xprc_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">prc
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xprc__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xprc_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains an example using the <a class="el" href="struct_x_prc.html" title="The XPrc instance data structure. ">XPrc</a> driver to test the registers on the device. </p>
<dl class="section note"><dt>Note</dt><dd>None</dd></dl>
<p>MODIFICATION HISTORY: </p>
<pre>
Ver      Who   Date           Changes
</p>
<hr/>
<p>
1.0   ms    07/18/2016     First Release
      ms    04/05/2017     Modified comment lines notation in functions to
                           avoid unnecessary description displayed
                           while generating doxygen.</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:abe6791e387b3717786af2eed5ab74b8a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xprc__example_8c.html#abe6791e387b3717786af2eed5ab74b8a">XPRC_DEVICE_ID</a>&#160;&#160;&#160;XPAR_PRC_0_DEVICE_ID</td></tr>
<tr class="memdesc:abe6791e387b3717786af2eed5ab74b8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The following constants map to the XPAR parameters created in the xparameters.h file.  <a href="#abe6791e387b3717786af2eed5ab74b8a">More...</a><br/></td></tr>
<tr class="separator:abe6791e387b3717786af2eed5ab74b8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a27ed847b2e946decd90de3370484db51"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xprc__example_8c.html#a27ed847b2e946decd90de3370484db51">XPrc_Example</a> (u16 DeviceId)</td></tr>
<tr class="memdesc:a27ed847b2e946decd90de3370484db51"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function does a minimal test on the PRC device and driver as a design example.  <a href="#a27ed847b2e946decd90de3370484db51">More...</a><br/></td></tr>
<tr class="separator:a27ed847b2e946decd90de3370484db51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5765ffedbd730a8b289991c23dc0bd2f"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xprc__example_8c.html#a5765ffedbd730a8b289991c23dc0bd2f">Xprc_Check_User_Command</a> (u16 VsmId, XGpio ShiftVsmGpio, XGpio CountVsmGpio)</td></tr>
<tr class="memdesc:a5765ffedbd730a8b289991c23dc0bd2f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to test the User Command.  <a href="#a5765ffedbd730a8b289991c23dc0bd2f">More...</a><br/></td></tr>
<tr class="separator:a5765ffedbd730a8b289991c23dc0bd2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac01e9e9445033fc90819edb82300b676"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xprc__example_8c.html#ac01e9e9445033fc90819edb82300b676">Xprc_Check_RestartWithStatus_Command</a> (u16 VsmId)</td></tr>
<tr class="memdesc:ac01e9e9445033fc90819edb82300b676"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to test the Restart with Status Command.  <a href="#ac01e9e9445033fc90819edb82300b676">More...</a><br/></td></tr>
<tr class="separator:ac01e9e9445033fc90819edb82300b676"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a93102a7b8b4e6107d9f60947b2a0f0"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xprc__example_8c.html#a0a93102a7b8b4e6107d9f60947b2a0f0">Xprc_Check_TriggerRmMapping</a> (u16 VsmId)</td></tr>
<tr class="memdesc:a0a93102a7b8b4e6107d9f60947b2a0f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to test that we can set/get the Trigger to RM mapping registers.  <a href="#a0a93102a7b8b4e6107d9f60947b2a0f0">More...</a><br/></td></tr>
<tr class="separator:a0a93102a7b8b4e6107d9f60947b2a0f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4282a7ea0bf561014a459c842b6bab1c"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xprc__example_8c.html#a4282a7ea0bf561014a459c842b6bab1c">Xprc_Check_BsIndex_Reg</a> (u16 VsmId)</td></tr>
<tr class="memdesc:a4282a7ea0bf561014a459c842b6bab1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to test that we can set/get the BS Index registers.  <a href="#a4282a7ea0bf561014a459c842b6bab1c">More...</a><br/></td></tr>
<tr class="separator:a4282a7ea0bf561014a459c842b6bab1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a718f120d4e23687969480731b08d930f"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xprc__example_8c.html#a718f120d4e23687969480731b08d930f">Xprc_Check_RmControl_Reg</a> (u16 VsmId)</td></tr>
<tr class="memdesc:a718f120d4e23687969480731b08d930f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to test that we can set/get the RM Control registers.  <a href="#a718f120d4e23687969480731b08d930f">More...</a><br/></td></tr>
<tr class="separator:a718f120d4e23687969480731b08d930f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9042c47a9658be469a2b5e35bd51f58"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xprc__example_8c.html#ac9042c47a9658be469a2b5e35bd51f58">Xprc_Check_BsSize_Reg</a> (u16 VsmId)</td></tr>
<tr class="memdesc:ac9042c47a9658be469a2b5e35bd51f58"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to test that we can set/get the BS Size registers.  <a href="#ac9042c47a9658be469a2b5e35bd51f58">More...</a><br/></td></tr>
<tr class="separator:ac9042c47a9658be469a2b5e35bd51f58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe71c72fb6ccf57cd06c53af3d960d45"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xprc__example_8c.html#afe71c72fb6ccf57cd06c53af3d960d45">Xprc_Check_BsAddress_Reg</a> (u16 VsmId)</td></tr>
<tr class="memdesc:afe71c72fb6ccf57cd06c53af3d960d45"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to test that we can set/get the BS Address registers.  <a href="#afe71c72fb6ccf57cd06c53af3d960d45">More...</a><br/></td></tr>
<tr class="separator:afe71c72fb6ccf57cd06c53af3d960d45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa00693461ce8502ac36969f4fd296448"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xprc__example_8c.html#aa00693461ce8502ac36969f4fd296448">Xprc_Program_PRC</a> (u16 VsmId)</td></tr>
<tr class="memdesc:aa00693461ce8502ac36969f4fd296448"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to Program the PRC.  <a href="#aa00693461ce8502ac36969f4fd296448">More...</a><br/></td></tr>
<tr class="separator:aa00693461ce8502ac36969f4fd296448"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab434664ae13e0888bd9c6f946a935297"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xprc__example_8c.html#ab434664ae13e0888bd9c6f946a935297">Xprc_Restart_VSMs</a> (u16 VsmId)</td></tr>
<tr class="memdesc:ab434664ae13e0888bd9c6f946a935297"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to Restart the VSMs.  <a href="#ab434664ae13e0888bd9c6f946a935297">More...</a><br/></td></tr>
<tr class="separator:ab434664ae13e0888bd9c6f946a935297"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xprc__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the main function to call the example.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="abe6791e387b3717786af2eed5ab74b8a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XPRC_DEVICE_ID&#160;&#160;&#160;XPAR_PRC_0_DEVICE_ID</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The following constants map to the XPAR parameters created in the xparameters.h file. </p>
<p>They are defined here such that a user can easily change all the needed parameters in one place. </p>

<p>Referenced by <a class="el" href="xprc__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the main function to call the example. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if successful.</li>
<li>XST_FAILURE if failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xprc__example_8c.html#abe6791e387b3717786af2eed5ab74b8a">XPRC_DEVICE_ID</a>, and <a class="el" href="xprc__example_8c.html#a27ed847b2e946decd90de3370484db51">XPrc_Example()</a>.</p>

</div>
</div>
<a class="anchor" id="afe71c72fb6ccf57cd06c53af3d960d45"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 Xprc_Check_BsAddress_Reg </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>VsmId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to test that we can set/get the BS Address registers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VsmId</td><td>is the identifier of the VSM to access.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if successful.</li>
<li>XST_FAILURE if failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="group__prc.html#ga74079c4b27f1c4dc1a7947911b7682d1">XPrc_GetBsAddress()</a>, <a class="el" href="group__prc.html#gaf28b7a33ca4cf58e128c968df5e54ecf">XPrc_GetNumberOfVsms</a>, <a class="el" href="group__prc.html#ga4775c570e83214c75ca9203731b42da0">XPrc_GetNumRmsAllocated</a>, and <a class="el" href="group__prc.html#ga66ef8c25b6a68047e74a6d30d215ebf9">XPrc_SetBsAddress()</a>.</p>

<p>Referenced by <a class="el" href="xprc__example_8c.html#a27ed847b2e946decd90de3370484db51">XPrc_Example()</a>.</p>

</div>
</div>
<a class="anchor" id="a4282a7ea0bf561014a459c842b6bab1c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 Xprc_Check_BsIndex_Reg </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>VsmId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to test that we can set/get the BS Index registers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VsmId</td><td>is the identifier of the VSM to access.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if successful.</li>
<li>XST_FAILURE if failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="group__prc.html#gaf28b7a33ca4cf58e128c968df5e54ecf">XPrc_GetNumberOfVsms</a>, <a class="el" href="group__prc.html#ga4775c570e83214c75ca9203731b42da0">XPrc_GetNumRmsAllocated</a>, <a class="el" href="group__prc.html#ga4328f5b970ea41269486688d36c71330">XPrc_GetRmBsIndex()</a>, and <a class="el" href="group__prc.html#gafa73a0de6152ced50f55b50533135d0d">XPrc_SetRmBsIndex()</a>.</p>

<p>Referenced by <a class="el" href="xprc__example_8c.html#a27ed847b2e946decd90de3370484db51">XPrc_Example()</a>.</p>

</div>
</div>
<a class="anchor" id="ac9042c47a9658be469a2b5e35bd51f58"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 Xprc_Check_BsSize_Reg </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>VsmId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to test that we can set/get the BS Size registers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VsmId</td><td>is the identifier of the VSM to access.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if successful.</li>
<li>XST_FAILURE if failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="group__prc.html#ga23ab1e4290b46abb79a99627c2f85d41">XPrc_GetBsSize()</a>, <a class="el" href="group__prc.html#gaf28b7a33ca4cf58e128c968df5e54ecf">XPrc_GetNumberOfVsms</a>, <a class="el" href="group__prc.html#ga4775c570e83214c75ca9203731b42da0">XPrc_GetNumRmsAllocated</a>, and <a class="el" href="group__prc.html#ga77ae77f041ca0822956e93f2c4841384">XPrc_SetBsSize()</a>.</p>

<p>Referenced by <a class="el" href="xprc__example_8c.html#a27ed847b2e946decd90de3370484db51">XPrc_Example()</a>.</p>

</div>
</div>
<a class="anchor" id="ac01e9e9445033fc90819edb82300b676"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 Xprc_Check_RestartWithStatus_Command </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>VsmId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to test the Restart with Status Command. </p>
<p>Flip the VSM state and set a new RM. Check the status is as expected. Flip the VSM state back to what it was and set the original RM. Check the status is as expected</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VsmId</td><td>is the identifier of the VSM to access.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if successful.</li>
<li>XST_FAILURE if failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="group__prc.html#gaf221d2761b3cb2f71b51c4029711e83e">XPRC_CR_VS_EMPTY</a>, <a class="el" href="group__prc.html#gada47152f33eac349c3fc17734b31ded8">XPRC_CR_VS_FULL</a>, <a class="el" href="group__prc.html#gaf28b7a33ca4cf58e128c968df5e54ecf">XPrc_GetNumberOfVsms</a>, <a class="el" href="group__prc.html#ga9d39e24052e6887d4e0e7ed776d9cd67">XPrc_GetNumRms</a>, <a class="el" href="group__prc.html#ga90981b900ba7f2e8db1eae4f5d1a8eae">XPrc_GetRmIdFromStatus()</a>, <a class="el" href="group__prc.html#ga16cd7447ee658a590b4e84fbcdd655fd">XPrc_GetVsmState()</a>, <a class="el" href="group__prc.html#ga169cd249e2ebac1ec7aaa31c6be22ec0">XPrc_IsVsmInShutdown()</a>, <a class="el" href="group__prc.html#ga1352d5c7fa50ff03c099da95d1f6d368">XPrc_ReadStatusReg()</a>, <a class="el" href="group__prc.html#gabf496a0a03c16a90c4579f5eb9346289">XPrc_SendRestartWithNoStatusCommand()</a>, <a class="el" href="group__prc.html#gaf1aadeb2cbc8b0ea416b86f6a722112d">XPrc_SendRestartWithStatusCommand()</a>, <a class="el" href="group__prc.html#ga8ae7427d46695146ebd8bb1cae333ad7">XPrc_SendShutdownCommand()</a>, <a class="el" href="group__prc.html#ga210d1f8df780c04c34d97f12c5248c16">XPRC_SR_STATE_EMPTY</a>, and <a class="el" href="group__prc.html#ga8c5e23d32e70feaa633f2947fc072c16">XPRC_SR_STATE_FULL</a>.</p>

<p>Referenced by <a class="el" href="xprc__example_8c.html#a27ed847b2e946decd90de3370484db51">XPrc_Example()</a>.</p>

</div>
</div>
<a class="anchor" id="a718f120d4e23687969480731b08d930f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 Xprc_Check_RmControl_Reg </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>VsmId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to test that we can set/get the RM Control registers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VsmId</td><td>is the identifier of the VSM to access.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if successful.</li>
<li>XST_FAILURE if failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The RM Control register contains the following fields: Name | Min value | Max value | Shutdown Required | 0 | 3 | Startup Required | 0 | 1 | Reset Required | 0 | 3 | Reset Duration | 0 | 255 | </dd></dl>

<p>References <a class="el" href="group__prc.html#gaf28b7a33ca4cf58e128c968df5e54ecf">XPrc_GetNumberOfVsms</a>, <a class="el" href="group__prc.html#ga4775c570e83214c75ca9203731b42da0">XPrc_GetNumRmsAllocated</a>, <a class="el" href="group__prc.html#ga4ae04635e1799c1fff8a1bf0acd7f10e">XPrc_GetRmControl()</a>, and <a class="el" href="group__prc.html#gaa3c36e7ac22439e68a49baf08a07cfc8">XPrc_SetRmControl()</a>.</p>

<p>Referenced by <a class="el" href="xprc__example_8c.html#a27ed847b2e946decd90de3370484db51">XPrc_Example()</a>.</p>

</div>
</div>
<a class="anchor" id="a0a93102a7b8b4e6107d9f60947b2a0f0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 Xprc_Check_TriggerRmMapping </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>VsmId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to test that we can set/get the Trigger to RM mapping registers. </p>
<p>For each trigger allocated, set the value of the RM it will load.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VsmId</td><td>is the identifier of the VSM to access.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if successful.</li>
<li>XST_FAILURE if failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The width of this register is set by the number of allocated RMs, so we can't use any number greater than that or else it will alias. </dd></dl>

<p>References <a class="el" href="group__prc.html#gaf28b7a33ca4cf58e128c968df5e54ecf">XPrc_GetNumberOfVsms</a>, <a class="el" href="group__prc.html#ga4775c570e83214c75ca9203731b42da0">XPrc_GetNumRmsAllocated</a>, <a class="el" href="group__prc.html#gad21071ccece439ee68cb2874f99983d8">XPrc_GetNumTriggersAllocated</a>, <a class="el" href="group__prc.html#ga715f096ec7bc1c5eaac8395444fcd03f">XPrc_GetTriggerToRmMapping()</a>, and <a class="el" href="group__prc.html#gabc3b273ffd5f67fbdfc7f57d7929b45b">XPrc_SetTriggerToRmMapping()</a>.</p>

<p>Referenced by <a class="el" href="xprc__example_8c.html#a27ed847b2e946decd90de3370484db51">XPrc_Example()</a>.</p>

</div>
</div>
<a class="anchor" id="a5765ffedbd730a8b289991c23dc0bd2f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 Xprc_Check_User_Command </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>VsmId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XGpio&#160;</td>
          <td class="paramname"><em>ShiftVsmGpio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XGpio&#160;</td>
          <td class="paramname"><em>CountVsmGpio</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to test the User Command. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VsmId</td><td>is the identifier of the VSM to access. </td></tr>
    <tr><td class="paramname">ShiftVsmGpio</td><td>is Instance of the GPIO attached to the PRC's Shift VSM. </td></tr>
    <tr><td class="paramname">CountVsmGpio</td><td>is Instance of the GPIO attached to the PRC's Count VSM.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if successful.</li>
<li>XST_FAILURE if failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This is only valid for this particular configuration of the PRC so it cannot be used in a general PRC test case. This is configuration dependent because each VSM has its own GPIO. </dd></dl>

<p>References <a class="el" href="group__prc.html#gae563b82b291ba26d8b6c5baaa8144b73">XPRC_CR_USER_CONTROL_RM_DECOUPLE_BIT</a>, <a class="el" href="group__prc.html#ga6e35414473fc5e26c96db54d6dc44bae">XPRC_CR_USER_CONTROL_RM_RESET_BIT</a>, <a class="el" href="group__prc.html#ga3ed8dfec1197fb072d20d942de4aa90f">XPRC_CR_USER_CONTROL_RM_SHUTDOWN_REQ_BIT</a>, <a class="el" href="group__prc.html#ga9f5efab7321c347477127e3179f509cf">XPRC_CR_USER_CONTROL_SW_SHUTDOWN_REQ_BIT</a>, <a class="el" href="group__prc.html#ga46d6b311b4ead348bb4b28de8c6836d2">XPRC_CR_USER_CONTROL_SW_STARTUP_REQ_BIT</a>, <a class="el" href="group__prc.html#gaf28b7a33ca4cf58e128c968df5e54ecf">XPrc_GetNumberOfVsms</a>, and <a class="el" href="group__prc.html#gad837665803c2971d369e832f4d4bd764">XPrc_SendUserControlCommand()</a>.</p>

<p>Referenced by <a class="el" href="xprc__example_8c.html#a27ed847b2e946decd90de3370484db51">XPrc_Example()</a>.</p>

</div>
</div>
<a class="anchor" id="a27ed847b2e946decd90de3370484db51"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XPrc_Example </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>DeviceId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function does a minimal test on the PRC device and driver as a design example. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">DeviceId</td><td>is the XPAR_&lt;prc_instance&gt;_DEVICE_ID value from xparameters.h.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if successful</li>
<li>XST_FAILURE if failed</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="group__prc.html#ga860a4c5ba01881e1547b8150affa7c0d">XPrc_CfgInitialize()</a>, <a class="el" href="xprc__example_8c.html#afe71c72fb6ccf57cd06c53af3d960d45">Xprc_Check_BsAddress_Reg()</a>, <a class="el" href="xprc__example_8c.html#a4282a7ea0bf561014a459c842b6bab1c">Xprc_Check_BsIndex_Reg()</a>, <a class="el" href="xprc__example_8c.html#ac9042c47a9658be469a2b5e35bd51f58">Xprc_Check_BsSize_Reg()</a>, <a class="el" href="xprc__example_8c.html#ac01e9e9445033fc90819edb82300b676">Xprc_Check_RestartWithStatus_Command()</a>, <a class="el" href="xprc__example_8c.html#a718f120d4e23687969480731b08d930f">Xprc_Check_RmControl_Reg()</a>, <a class="el" href="xprc__example_8c.html#a0a93102a7b8b4e6107d9f60947b2a0f0">Xprc_Check_TriggerRmMapping()</a>, <a class="el" href="xprc__example_8c.html#a5765ffedbd730a8b289991c23dc0bd2f">Xprc_Check_User_Command()</a>, <a class="el" href="group__prc.html#gaf28b7a33ca4cf58e128c968df5e54ecf">XPrc_GetNumberOfVsms</a>, <a class="el" href="group__prc.html#ga9d39e24052e6887d4e0e7ed776d9cd67">XPrc_GetNumRms</a>, <a class="el" href="group__prc.html#ga90981b900ba7f2e8db1eae4f5d1a8eae">XPrc_GetRmIdFromStatus()</a>, <a class="el" href="group__prc.html#ga16cd7447ee658a590b4e84fbcdd655fd">XPrc_GetVsmState()</a>, <a class="el" href="group__prc.html#ga169cd249e2ebac1ec7aaa31c6be22ec0">XPrc_IsVsmInShutdown()</a>, <a class="el" href="group__prc.html#ga61ee29cca9dae9f18fb9a635f5c0a4b2">XPrc_LookupConfig()</a>, <a class="el" href="group__prc.html#ga284cb34c70c7bcdcd8c94f6843184b33">XPrc_PrintVsmStatus()</a>, <a class="el" href="xprc__example_8c.html#aa00693461ce8502ac36969f4fd296448">Xprc_Program_PRC()</a>, <a class="el" href="group__prc.html#ga1352d5c7fa50ff03c099da95d1f6d368">XPrc_ReadStatusReg()</a>, <a class="el" href="xprc__example_8c.html#ab434664ae13e0888bd9c6f946a935297">Xprc_Restart_VSMs()</a>, <a class="el" href="group__prc.html#gaf15c985cf911548b53252824dc933313">XPrc_SelfTest()</a>, <a class="el" href="group__prc.html#ga8ae7427d46695146ebd8bb1cae333ad7">XPrc_SendShutdownCommand()</a>, <a class="el" href="group__prc.html#ga6d547d05931dc7104a1c99ac832a84fb">XPrc_SendSwTrigger()</a>, and <a class="el" href="group__prc.html#ga8c5e23d32e70feaa633f2947fc072c16">XPRC_SR_STATE_FULL</a>.</p>

<p>Referenced by <a class="el" href="xprc__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<a class="anchor" id="aa00693461ce8502ac36969f4fd296448"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 Xprc_Program_PRC </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>VsmId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to Program the PRC. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VsmId</td><td>is the identifier of the VSM to access.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if successful.</li>
<li>XST_FAILURE if failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>For each allocated RM in each VSM, generate a partial bitstream and store it in memory. Program the PRC to point at it. </dd></dl>

<p>References <a class="el" href="group__prc.html#gaf28b7a33ca4cf58e128c968df5e54ecf">XPrc_GetNumberOfVsms</a>, <a class="el" href="group__prc.html#ga9d39e24052e6887d4e0e7ed776d9cd67">XPrc_GetNumRms</a>, <a class="el" href="group__prc.html#ga66ef8c25b6a68047e74a6d30d215ebf9">XPrc_SetBsAddress()</a>, <a class="el" href="group__prc.html#ga77ae77f041ca0822956e93f2c4841384">XPrc_SetBsSize()</a>, <a class="el" href="group__prc.html#gafa73a0de6152ced50f55b50533135d0d">XPrc_SetRmBsIndex()</a>, and <a class="el" href="group__prc.html#gaa3c36e7ac22439e68a49baf08a07cfc8">XPrc_SetRmControl()</a>.</p>

<p>Referenced by <a class="el" href="xprc__example_8c.html#a27ed847b2e946decd90de3370484db51">XPrc_Example()</a>.</p>

</div>
</div>
<a class="anchor" id="ab434664ae13e0888bd9c6f946a935297"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xprc_Restart_VSMs </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>VsmId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to Restart the VSMs. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VsmId</td><td>is the identifier of the VSM to access.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if successful.</li>
<li>XST_FAILURE if failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="group__prc.html#gaf28b7a33ca4cf58e128c968df5e54ecf">XPrc_GetNumberOfVsms</a>, <a class="el" href="group__prc.html#ga169cd249e2ebac1ec7aaa31c6be22ec0">XPrc_IsVsmInShutdown()</a>, and <a class="el" href="group__prc.html#gabf496a0a03c16a90c4579f5eb9346289">XPrc_SendRestartWithNoStatusCommand()</a>.</p>

<p>Referenced by <a class="el" href="xprc__example_8c.html#a27ed847b2e946decd90de3370484db51">XPrc_Example()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
